import 'package:flutter/material.dart';
import '../constants.dart' show AppColors;

class WechatPage extends StatefulWidget {
  final int pageIndex;

  WechatPage(this.pageIndex);

  @override
  _WechatPageState createState() => _WechatPageState();
}

class _WechatPageState extends State<WechatPage>
    with AutomaticKeepAliveClientMixin {
  @override
  bool get wantKeepAlive => true;

  @override
  Widget build(BuildContext context) {
    return ListView.builder(
      itemBuilder: (BuildContext context, int index) {
        return Container(
            padding: EdgeInsets.all(1.0),
            child: Column(
              mainAxisAlignment: MainAxisAlignment.start,
              children: <Widget>[
                Container(
                  child: Row(
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: <Widget>[
                      Container(
                        width: 45.0,
                        height: 45.0,
                        decoration: BoxDecoration(
                            borderRadius:
                                BorderRadius.all(Radius.circular(5.0)),
                            image: DecorationImage(
                                image: NetworkImage(
                                    'http://pic.baike.soso.com/p/20130828/20130828161137-1346445960.jpg'))),
                      ),
                      Container(
                        width: 10.0,
                      ),
                      Container(
                        child: Column(
                          children: <Widget>[Text("1111"), Text("2222")],
                        ),
                      )
                    ],
                  ),
                ),
                new Divider()
              ],
            ));
      },
      padding: EdgeInsets.all(8.0),
    );
  }
}
